package org.cll.lagou.study.ssm.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2020/6/23 11:07
 */
@Controller
public class IndexController {

    private static final Logger logger = LoggerFactory.getLogger(IndexController.class);

    @RequestMapping(value = "/")
    public String welcome(RedirectAttributes redirectAttributes) {
        logger.info("====== 访问项目首页");
        redirectAttributes.addFlashAttribute("init", "welcome");
        return "redirect:/user/login";
    }
}